package com.azunitech.guice;

import static com.google.inject.matcher.Matchers.annotatedWith;
import static com.google.inject.matcher.Matchers.any;

import com.google.inject.AbstractModule;
import com.google.inject.Scopes;

public class GuiceCacheModule extends AbstractModule{

	@Override
	protected void configure() {
		bind(IRepository.class).to(EmployeeRepository.class).in(Scopes.SINGLETON);
		bindInterceptor(
	            any(),
	            annotatedWith(Cached.class),
	            new CacheInterceptor());
	}
}
